<script setup lang="ts">
import { useUrlSearchParams } from '@peng_kai/kit/libs/vueuse';
import { useCounterStore } from '../useFilterTypeInject';

const route = useRoute();
const { activeId } = useCounterStore()!;
const actions = computed(() => [
  { value: 0, label: $t('ug2fOrh0NriyVASqVa') },
  { value: 1, label: $t('cZyokGjBYqRhe77Rw9ouF') },
  { value: 3, label: $t('vwIm7RlsltxuHa5JwVxcO') },
  { value: 5, label: $t('ditzIyOrmk2lu0T8zurAd') },
  { value: 6, label: $t('hNBUtNUgqMBdZ0jI6Eq') },
  { value: 7, label: $t('d17nHI513h7O2eqqLUp') },
]);

watchEffect(() => {
  if (route.query.active) {
    const index = actions.value.findIndex(i => i.value === Number(route.query.active));
    if (index === -1)
      return;
    activeId.value = actions.value[index].value;
  }
});
</script>

<template>
  <!-- <TAntdTheme component="Select" theme="light"> -->
  <ASelect
    v-model:value="activeId" :options="actions"
    class="antd-cover__Select-3d-gray" :class="[$attrs.class]"
    :bordered="false" size="small" :virtual="false"
  />
  <!-- </TAntdTheme> -->
</template>

<style scoped lang="scss">

</style>
